A microcontroller is generally composed of a central control unit, data and program memories, and peripherals. For example, one peripheral might be a communication interface, another peripheral might be a timer, and yet another might be an analog to digital converter (ADC) or sometimes a digital to analog converter (DAC).
At the moment few microcontrollers have an integrated DAC. Consequently, when there is no microcontroller with an integrated DAC, an external DAC has to be used controlled by a peripheral, the interface between the microcontroller and the DAC being made through a serial bus usually of the SPI (Serial Peripheral Interface) type, or the I2C (Inter Integrated Circuit) type, or directly in parallel.
However, regardless of whether the DAC is integrated into the microcontroller or is external, time management by the central processing unit of this microcontroller is not very precise. Since the microcontroller usually manages real time, the execution of a program may be modified by hardware or software interrupts being introduced, processed asynchronously by the control unit.
In the DAC, the beginning of the conversion is initiated by execution of an instruction in the control unit of the microcontroller, making a write in a buffer register.
In order to generate an analog wave shape F(t) on the DAC output, the converter has to be programmed so that it converts the value F(n) at precise instants ta.
This technique is described in more detail later, with reference to FIGS. 1A, 1B and 2.
One major disadvantage of systems described according to prior art is that the conversions are not made at precise instants, with the control unit triggering the conversion at the DAC. The control unit is configured to deal with interrupts, consequently it delays real time instructions.